Error: "File cannot be loaded because the execution of scripts is disabled on this system"
Hello,
I'm executing powershell scripts from command prompt. I've changed my execution policy to Unrestricted. Also, Get-ExecutionPolicy is showing 'Unrestricted'. When i execute following error
"File cannot be loaded because the execution of scripts is disabled on this system"
Reason ?
August 10th, 2011 3:23pm
Is it a 64 bit machine? If so, open the x86 instance of PowerShell and check (set) the execution policy.
August 10th, 2011 3:33pm
Yes, it's a x64 machine and i'm using SharePoint 2010 Management Shell.
Where can i find x86 instance ?
August 10th, 2011 3:39pm
Yes, it's a x64 machine and i'm using SharePoint 2010 Management Shell.
Where can i find x86 inst
August 10th, 2011 3:43pm
Please try this
Set-ExecutionPolicy Unrestricted
- Edited by
imd.net
Wednesday, February 01, 2012 11:39 PM
- Proposed as answer by
Rob Kerr - Ann Arbor
Tuesday, May 15, 2012 1:14 AM
February 2nd, 2012 2:27am
Try with Force switch
Set-ExecutionPolicy Unrestricted -Force
February 2nd, 2012 12:27pm
If I use -Force I get...
A parameter cannot be found that matches the parameter name 'Force'
April 30th, 2012 2:07pm
Had the same issue, and this has fixed it for me!
Seems a bit odd that the system would have different Execution Policies for 32 and 64-bit though doesn't it?
Thanks for the help!
June 15th, 2012 12:52pm
Running powershell as Administrator and executing "set-ExecutionPolicy Unrestricted" worked for me.
February 20th, 2014 1:50pm